package it.mp.multitask.view;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.HorizontalScrollView;

public class HorizontalScrollViewTask extends HorizontalScrollView {

	private int scroll = 0;
	public HorizontalScrollViewTask(Context context, AttributeSet attrs) {
		super(context, attrs);
	}

	@Override
	protected void onLayout(boolean changed, int l, int t, int r, int b) {
		super.onLayout(changed, l, t, r, b);
		this.smoothScrollBy(scroll, 0);

	}

	public void setScrollPosition(int scroll) {
		this.scroll = scroll;
	}

	public int getScrollPosition() {
		return scroll;
	}

}
